//
//  DSCourseCell.m
//  DSJY
//
//  Created by 冯华强 on 16/9/23.
//  Copyright © 2016年 dsjy. All rights reserved.
//  课程列表Cell

#import "DSCourseCell.h"
#import "DSCourse.h"
#import "DSUnit.h"
#import "UIImageView+WebCache.h"

@interface DSCourseCell ()
//图片
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
//标题
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@end

@implementation DSCourseCell

#pragma mark - 设置UI
- (void)setCourse:(DSCourse *)course
{
    _course = course;
    
    [self setupName:course.name iconUrlString:course.bookfaceString];
}

- (void)setupName:(NSString *)name iconUrlString:(NSString *)iconUrlString
{
    self.titleLabel.text = name;
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:iconUrlString] placeholderImage:[UIImage imageNamed:@"defaultH310"]];
}

@end
